-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #21 #23
base: master
Are you sure you want to change the base?
Fixed #21 #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AhmedMKamal thanks again for the PR. In this PR you have some changes that are now merged to master. Can you merge master to this branch to eliminate them and me have a second review? Also added a few comments. Cheers bud
Hey, @marudy your comments have been resolved, but I can't sync this brunch with you updated master brunch I think I have to reopen new PR or just merge this one as is. |
Dimensions.removeEventListener('change', () => {}); | ||
const removeOrientationListener = orientationChangeHandler => { | ||
// Warn if the original handler not passed. | ||
if (orientationChangeHandler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be oposite condition -> if (!orientationChangeHandler) {
As lschuft mentioned it's not a good approach to meth the component's props, instead the
listenOrientationChange
may return the original handler, store it somewhere and push it back toremoveOrientationListener